﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MainMaster.Master" Inherits="System.Web.Mvc.ViewPage<IList<CoVanHocTapData.Entities.MonHocTheoHocKy>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ChuongTrinhDaoTaoChuan
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<link href="../../CSS/stylesheets/jquery.tooltip/jquery.tooltip.css" rel="stylesheet" type="text/css" />
<script src="../../CSS/javascripts/jquery.min.js" type="text/javascript"></script>    
<script src="../../CSS/javascripts/jquery.tooltip.js" type="text/javascript"></script>    

<style type="text/css">
       
      div.item {  background-color: #56738F; text-align:center; height:50px }
      
    </style>

<script type="text/javascript">
    $j = jQuery.noConflict();
    $j(document).ready(function () {
        $j("div.item").tooltip().css({ opacity: 0.9 });
    });
    </script>

     

<%if (CoVanHocTapProject.Infrastructure.Publics.sinhVienDangNhap != null && Model!=null)
  {%>
 
     <table border=1 cellpadding=0 cellspacing=0 >        
       
        <tr style="background-color:#DCDCDC; " >
            <td align="center" valign="middle" style="width:180px; height:30px;
            font-weight:bold ">HK1</td>
            <td align="center" valign="middle" style="width:180px; font-weight:bold" >HK2</td>
            <td align="center" valign="middle" style="width:180px;font-weight:bold">HK3</td>
            <td align="center" valign="middle" style="width:180px;font-weight:bold">HK4</td>
            <td align="center" valign="middle" style="width:180px;font-weight:bold">HK5</td>
            <td align="center" valign="middle" style="width:180px;font-weight:bold">HK6</td>
            <td align="center" valign="middle" style="width:180px;font-weight:bold">HK7</td>
            <td align="center" valign="middle" style="width:180px;font-weight:bold">HK8</td>
            </tr>
       
       <tr>
    <%for (int i = 0; i < 9; i++)
      {%>
                    
        <td  valign="top" align="center">
          
             <% foreach (var item in Model)
              {
             
                  if (int.Parse(item.HocKy) == i + 1 && item.LaMonTuChon==false)
                  {%>             
                    
                    
                    <%if (!String.IsNullOrEmpty(item.MonHocSongHanh))
                    {%>
                        
                        <div class="item">
                            <b><%= item.MonHocID %></b>          
                            <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                        <div class="tooltip_description" style="display:none;" 
                        title="Môn học song hành"><%=item.MonHocSongHanh %></div>
                        </div>
                    <%} %>
                    <%else if (!String.IsNullOrEmpty(item.MonHocTienQuyet))
                        {%>
                            <div class="item">
                            <b><%= item.MonHocID %></b>
                            <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                            <div class="tooltip_description" style="display:none;" 
                            title="Môn học tiên quyết"><%=item.MonHocTienQuyet %></div>
                            </div>
                    <%} %>
                    <%else if (!String.IsNullOrEmpty(item.MonHocTruoc))
                        {%>
                            
                            <div class="item">
                            <b><%= item.MonHocID%></b>
                            <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                            <div class="tooltip_description" style="display:none;" 
                        title="Môn học trước"><%=item.MonHocTruoc%></div>
                        </div>
                            
                    <%} %>
                    <%else
                        {%>
                        <div style="height:50px">
                             <b><%= item.MonHocID%></b>
                             <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                        </div>
                        <%} %>
                    
                    
                   
                    <br /> <br />               
                    
                    <%}
                    
              }%>
          
        </td>
      <%} %>
      </tr>
    </table>

    <br /> <br />

    <%int j=0; %>
    <table>
    <tr>
        
    
    <%foreach (var tenKhoiTuChonItem in Model.FirstOrDefault().TenKhoiMonTuChonList)
      {%>
        <%int i = 0; %>
        <% if (j < 2)
           {
               j++;%>
          
               <td> 
                
        <%}
           else
           {
               j = 0;%>
           <br /><br />
           </tr>
           <tr>
            <td>
        <%} %>

        <table border=1 cellpadding=0 cellspacing=0 style="margin-left:20px">
            <tr style="background-color:#DCDCDC; ">
                <td colspan=2 align="center" valign="middle" style="width:180px; font-weight:bold; height:30px">
                <%=tenKhoiTuChonItem %></td>
            </tr>
            <tr>
            <%foreach(var item in Model) {%>
                <%if(item.TenKhoiMonTuChon!=null &&  item.TenKhoiMonTuChon.Equals(tenKhoiTuChonItem)) {%>
                    <%if (i < 2)
                      {%>
                        <td align="center" valign="middle">
                            <%if (!String.IsNullOrEmpty(item.MonHocSongHanh))
                            {%>
                        
                                <div class="item">
                                    <b><%= item.MonHocID %></b>          
                                    <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                                <div class="tooltip_description" style="display:none;" 
                                title="Môn học song hành"><%=item.MonHocSongHanh %></div>
                                </div>
                            <%} %>
                            <%else if (!String.IsNullOrEmpty(item.MonHocTienQuyet))
                                {%>
                                    <div class="item">
                                    <b><%= item.MonHocID %></b>
                                    <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                                    <div class="tooltip_description" style="display:none;" 
                                    title="Môn học tiên quyết"><%=item.MonHocTienQuyet %></div>
                                    </div>
                            <%} %>
                            <%else if (!String.IsNullOrEmpty(item.MonHocTruoc))
                                {%>
                            
                                    <div class="item">
                                    <b><%= item.MonHocID%></b>
                                    <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                                    <div class="tooltip_description" style="display:none;" 
                                title="Môn học trước"><%=item.MonHocTruoc%></div>
                                </div>
                            
                            <%} %>
                            <%else
                                {%>
                                <div style="height:50px">
                                     <b><%= item.MonHocID%></b>
                                     <div align="center"  ><%= item.TenMonHoc %></div>
                                </div>
                                <%} %>
                        
                           <%-- <br />
                            <%= item.TenMonHoc%>--%>
                            <%i++; %>
                        </td>
                    <%}
                      else
                      { %>
                        </tr>
                        <tr>
                        <%i = 0; %>
                        <td align="center" valign="middle">
                            <%if (!String.IsNullOrEmpty(item.MonHocSongHanh))
                            {%>
                        
                                <div class="item">
                                    <b><%= item.MonHocID %></b>          
                                    <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                                <div class="tooltip_description" style="display:none;" 
                                title="Môn học song hành"><%=item.MonHocSongHanh %></div>
                                </div>
                            <%} %>
                            <%else if (!String.IsNullOrEmpty(item.MonHocTienQuyet))
                                {%>
                                    <div class="item">
                                    <b><%= item.MonHocID %></b>
                                    <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                                    <div class="tooltip_description" style="display:none;" 
                                    title="Môn học tiên quyết"><%=item.MonHocTienQuyet %></div>
                                    </div>
                            <%} %>
                            <%else if (!String.IsNullOrEmpty(item.MonHocTruoc))
                                {%>
                            
                                    <div class="item">
                                    <b><%= item.MonHocID%></b>
                                    <div align="center"  style="font-size:10px"><%= item.TenMonHoc %></div>
                                    <div class="tooltip_description" style="display:none;" 
                                title="Môn học trước"><%=item.MonHocTruoc%></div>
                                </div>
                            
                            <%} %>
                            <%else
                                {%>
                                <div style="height:50px">
                                     <b><%= item.MonHocID%></b>
                                     <div align="center"  ><%= item.TenMonHoc %></div>
                                </div>
                                <%} %>
                            <%i++; %>
                        </td>
                    <%} %>
                <%} %>
                
            <%} %>
            </tr>
        </table>
        </td>
    

    <%} %>
   
    </tr>
    </table> 
    
<%} %>


</asp:Content>
